3.42 \(\int \sqrt{a+a \sec (e+f x)} (c-c \sec (e+f x))^4 \, dx\)

Optimal. Leaf size=175 \[ \frac{2 a^4 c^4 \tan ^7(e+f x)}{7 f (a \sec (e+f x)+a)^{7/2}}-\frac{2 a^3 c^4 \tan ^5(e+f x)}{5 f (a \sec (e+f x)+a)^{5/2}}+\frac{2 a^2 c^4 \tan ^3(e+f x)}{3 f (a \sec (e+f x)+a)^{3/2}}+\frac{2 \sqrt{a} c^4 \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a \sec (e+f x)+a}}\right )}{f}-\frac{2 a c^4 \tan (e+f x)}{f \sqrt{a \sec (e+f x)+a}} \]

[Out]

(2*Sqrt[a]*c^4*ArcTan[(Sqrt[a]*Tan[e + f*x])/Sqrt[a + a*Sec[e + f*x]]])/f - (2*a*c^4*Tan[e + f*x])/(f*Sqrt[a +
 a*Sec[e + f*x]]) + (2*a^2*c^4*Tan[e + f*x]^3)/(3*f*(a + a*Sec[e + f*x])^(3/2)) - (2*a^3*c^4*Tan[e + f*x]^5)/(
5*f*(a + a*Sec[e + f*x])^(5/2)) + (2*a^4*c^4*Tan[e + f*x]^7)/(7*f*(a + a*Sec[e + f*x])^(7/2))

________________________________________________________________________________________

Rubi [A]  time = 0.176185, antiderivative size = 175, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {3904, 3887, 302, 203} \[ \frac{2 a^4 c^4 \tan ^7(e+f x)}{7 f (a \sec (e+f x)+a)^{7/2}}-\frac{2 a^3 c^4 \tan ^5(e+f x)}{5 f (a \sec (e+f x)+a)^{5/2}}+\frac{2 a^2 c^4 \tan ^3(e+f x)}{3 f (a \sec (e+f x)+a)^{3/2}}+\frac{2 \sqrt{a} c^4 \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a \sec (e+f x)+a}}\right )}{f}-\frac{2 a c^4 \tan (e+f x)}{f \sqrt{a \sec (e+f x)+a}} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[a + a*Sec[e + f*x]]*(c - c*Sec[e + f*x])^4,x]

[Out]

(2*Sqrt[a]*c^4*ArcTan[(Sqrt[a]*Tan[e + f*x])/Sqrt[a + a*Sec[e + f*x]]])/f - (2*a*c^4*Tan[e + f*x])/(f*Sqrt[a +
 a*Sec[e + f*x]]) + (2*a^2*c^4*Tan[e + f*x]^3)/(3*f*(a + a*Sec[e + f*x])^(3/2)) - (2*a^3*c^4*Tan[e + f*x]^5)/(
5*f*(a + a*Sec[e + f*x])^(5/2)) + (2*a^4*c^4*Tan[e + f*x]^7)/(7*f*(a + a*Sec[e + f*x])^(7/2))

Rule 3904

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_.), x_Symbol] :> Di
st[(-(a*c))^m, Int[Cot[e + f*x]^(2*m)*(c + d*Csc[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x]
&& EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && RationalQ[n] &&  !(IntegerQ[n] && GtQ[m - n, 0])

Rule 3887

Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_.), x_Symbol] :> Dist[(-2*a^(m/2 +
 n + 1/2))/d, Subst[Int[(x^m*(2 + a*x^2)^(m/2 + n - 1/2))/(1 + a*x^2), x], x, Cot[c + d*x]/Sqrt[a + b*Csc[c +
d*x]]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0] && IntegerQ[m/2] && IntegerQ[n - 1/2]

Rule 302

Int[(x_)^(m_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Int[PolynomialDivide[x^m, a + b*x^n, x], x] /; FreeQ[{a,
b}, x] && IGtQ[m, 0] && IGtQ[n, 0] && GtQ[m, 2*n - 1]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \sqrt{a+a \sec (e+f x)} (c-c \sec (e+f x))^4 \, dx &=\left (a^4 c^4\right ) \int \frac{\tan ^8(e+f x)}{(a+a \sec (e+f x))^{7/2}} \, dx\\ &=-\frac{\left (2 a^5 c^4\right ) \operatorname{Subst}\left (\int \frac{x^8}{1+a x^2} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{f}\\ &=-\frac{\left (2 a^5 c^4\right ) \operatorname{Subst}\left (\int \left (-\frac{1}{a^4}+\frac{x^2}{a^3}-\frac{x^4}{a^2}+\frac{x^6}{a}+\frac{1}{a^4 \left (1+a x^2\right )}\right ) \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{f}\\ &=-\frac{2 a c^4 \tan (e+f x)}{f \sqrt{a+a \sec (e+f x)}}+\frac{2 a^2 c^4 \tan ^3(e+f x)}{3 f (a+a \sec (e+f x))^{3/2}}-\frac{2 a^3 c^4 \tan ^5(e+f x)}{5 f (a+a \sec (e+f x))^{5/2}}+\frac{2 a^4 c^4 \tan ^7(e+f x)}{7 f (a+a \sec (e+f x))^{7/2}}-\frac{\left (2 a c^4\right ) \operatorname{Subst}\left (\int \frac{1}{1+a x^2} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{f}\\ &=\frac{2 \sqrt{a} c^4 \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{f}-\frac{2 a c^4 \tan (e+f x)}{f \sqrt{a+a \sec (e+f x)}}+\frac{2 a^2 c^4 \tan ^3(e+f x)}{3 f (a+a \sec (e+f x))^{3/2}}-\frac{2 a^3 c^4 \tan ^5(e+f x)}{5 f (a+a \sec (e+f x))^{5/2}}+\frac{2 a^4 c^4 \tan ^7(e+f x)}{7 f (a+a \sec (e+f x))^{7/2}}\\ \end{align*}

Mathematica [A]  time = 1.01161, size = 121, normalized size = 0.69 \[ \frac{2 c^4 \tan \left (\frac{1}{2} (e+f x)\right ) \sec ^3(e+f x) \sqrt{a (\sec (e+f x)+1)} \left ((-198 \cos (e+f x)+61 \cos (2 (e+f x))-44 \cos (3 (e+f x))+76) \sqrt{\sec (e+f x)-1}+105 \cos ^3(e+f x) \tan ^{-1}\left (\sqrt{\sec (e+f x)-1}\right )\right )}{105 f \sqrt{\sec (e+f x)-1}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a + a*Sec[e + f*x]]*(c - c*Sec[e + f*x])^4,x]

[Out]

(2*c^4*(105*ArcTan[Sqrt[-1 + Sec[e + f*x]]]*Cos[e + f*x]^3 + (76 - 198*Cos[e + f*x] + 61*Cos[2*(e + f*x)] - 44
*Cos[3*(e + f*x)])*Sqrt[-1 + Sec[e + f*x]])*Sec[e + f*x]^3*Sqrt[a*(1 + Sec[e + f*x])]*Tan[(e + f*x)/2])/(105*f
*Sqrt[-1 + Sec[e + f*x]])

________________________________________________________________________________________

Maple [B]  time = 0.319, size = 391, normalized size = 2.2 \begin{align*}{\frac{{c}^{4}}{840\,f\sin \left ( fx+e \right ) \left ( \cos \left ( fx+e \right ) \right ) ^{3}}\sqrt{{\frac{a \left ( 1+\cos \left ( fx+e \right ) \right ) }{\cos \left ( fx+e \right ) }}} \left ( 105\,\sqrt{2}\sin \left ( fx+e \right ) \left ( \cos \left ( fx+e \right ) \right ) ^{3}{\it Artanh} \left ( 1/2\,{\frac{\sqrt{2}\sin \left ( fx+e \right ) }{\cos \left ( fx+e \right ) }\sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}} \right ) \left ( -2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }} \right ) ^{7/2}+315\,\sqrt{2}\sin \left ( fx+e \right ) \left ( \cos \left ( fx+e \right ) \right ) ^{2}{\it Artanh} \left ( 1/2\,{\frac{\sqrt{2}\sin \left ( fx+e \right ) }{\cos \left ( fx+e \right ) }\sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}} \right ) \left ( -2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }} \right ) ^{7/2}+315\,\sqrt{2}\sin \left ( fx+e \right ) \cos \left ( fx+e \right ){\it Artanh} \left ( 1/2\,{\frac{\sqrt{2}\sin \left ( fx+e \right ) }{\cos \left ( fx+e \right ) }\sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}} \right ) \left ( -2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }} \right ) ^{7/2}+105\,\sqrt{2}{\it Artanh} \left ( 1/2\,{\frac{\sqrt{2}\sin \left ( fx+e \right ) }{\cos \left ( fx+e \right ) }\sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}} \right ) \left ( -2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }} \right ) ^{7/2}\sin \left ( fx+e \right ) +2816\, \left ( \cos \left ( fx+e \right ) \right ) ^{4}-4768\, \left ( \cos \left ( fx+e \right ) \right ) ^{3}+3008\, \left ( \cos \left ( fx+e \right ) \right ) ^{2}-1296\,\cos \left ( fx+e \right ) +240 \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c-c*sec(f*x+e))^4*(a+a*sec(f*x+e))^(1/2),x)

[Out]

1/840*c^4/f*(1/cos(f*x+e)*a*(1+cos(f*x+e)))^(1/2)*(105*2^(1/2)*sin(f*x+e)*cos(f*x+e)^3*arctanh(1/2*2^(1/2)*(-2
*cos(f*x+e)/(1+cos(f*x+e)))^(1/2)*sin(f*x+e)/cos(f*x+e))*(-2*cos(f*x+e)/(1+cos(f*x+e)))^(7/2)+315*2^(1/2)*sin(
f*x+e)*cos(f*x+e)^2*arctanh(1/2*2^(1/2)*(-2*cos(f*x+e)/(1+cos(f*x+e)))^(1/2)*sin(f*x+e)/cos(f*x+e))*(-2*cos(f*
x+e)/(1+cos(f*x+e)))^(7/2)+315*2^(1/2)*sin(f*x+e)*cos(f*x+e)*arctanh(1/2*2^(1/2)*(-2*cos(f*x+e)/(1+cos(f*x+e))
)^(1/2)*sin(f*x+e)/cos(f*x+e))*(-2*cos(f*x+e)/(1+cos(f*x+e)))^(7/2)+105*2^(1/2)*arctanh(1/2*2^(1/2)*(-2*cos(f*
x+e)/(1+cos(f*x+e)))^(1/2)*sin(f*x+e)/cos(f*x+e))*(-2*cos(f*x+e)/(1+cos(f*x+e)))^(7/2)*sin(f*x+e)+2816*cos(f*x
+e)^4-4768*cos(f*x+e)^3+3008*cos(f*x+e)^2-1296*cos(f*x+e)+240)/sin(f*x+e)/cos(f*x+e)^3

________________________________________________________________________________________

Maxima [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c-c*sec(f*x+e))^4*(a+a*sec(f*x+e))^(1/2),x, algorithm="maxima")

[Out]

Timed out

________________________________________________________________________________________

Fricas [A]  time = 1.26172, size = 960, normalized size = 5.49 \begin{align*} \left [\frac{105 \,{\left (c^{4} \cos \left (f x + e\right )^{4} + c^{4} \cos \left (f x + e\right )^{3}\right )} \sqrt{-a} \log \left (\frac{2 \, a \cos \left (f x + e\right )^{2} - 2 \, \sqrt{-a} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + a \cos \left (f x + e\right ) - a}{\cos \left (f x + e\right ) + 1}\right ) - 2 \,{\left (176 \, c^{4} \cos \left (f x + e\right )^{3} - 122 \, c^{4} \cos \left (f x + e\right )^{2} + 66 \, c^{4} \cos \left (f x + e\right ) - 15 \, c^{4}\right )} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right )}{105 \,{\left (f \cos \left (f x + e\right )^{4} + f \cos \left (f x + e\right )^{3}\right )}}, -\frac{2 \,{\left (105 \,{\left (c^{4} \cos \left (f x + e\right )^{4} + c^{4} \cos \left (f x + e\right )^{3}\right )} \sqrt{a} \arctan \left (\frac{\sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt{a} \sin \left (f x + e\right )}\right ) +{\left (176 \, c^{4} \cos \left (f x + e\right )^{3} - 122 \, c^{4} \cos \left (f x + e\right )^{2} + 66 \, c^{4} \cos \left (f x + e\right ) - 15 \, c^{4}\right )} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right )\right )}}{105 \,{\left (f \cos \left (f x + e\right )^{4} + f \cos \left (f x + e\right )^{3}\right )}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c-c*sec(f*x+e))^4*(a+a*sec(f*x+e))^(1/2),x, algorithm="fricas")

[Out]

[1/105*(105*(c^4*cos(f*x + e)^4 + c^4*cos(f*x + e)^3)*sqrt(-a)*log((2*a*cos(f*x + e)^2 - 2*sqrt(-a)*sqrt((a*co
s(f*x + e) + a)/cos(f*x + e))*cos(f*x + e)*sin(f*x + e) + a*cos(f*x + e) - a)/(cos(f*x + e) + 1)) - 2*(176*c^4
*cos(f*x + e)^3 - 122*c^4*cos(f*x + e)^2 + 66*c^4*cos(f*x + e) - 15*c^4)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e
))*sin(f*x + e))/(f*cos(f*x + e)^4 + f*cos(f*x + e)^3), -2/105*(105*(c^4*cos(f*x + e)^4 + c^4*cos(f*x + e)^3)*
sqrt(a)*arctan(sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e)/(sqrt(a)*sin(f*x + e))) + (176*c^4*cos(f*x
 + e)^3 - 122*c^4*cos(f*x + e)^2 + 66*c^4*cos(f*x + e) - 15*c^4)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*sin(f
*x + e))/(f*cos(f*x + e)^4 + f*cos(f*x + e)^3)]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} c^{4} \left (\int - 4 \sqrt{a \sec{\left (e + f x \right )} + a} \sec{\left (e + f x \right )}\, dx + \int 6 \sqrt{a \sec{\left (e + f x \right )} + a} \sec ^{2}{\left (e + f x \right )}\, dx + \int - 4 \sqrt{a \sec{\left (e + f x \right )} + a} \sec ^{3}{\left (e + f x \right )}\, dx + \int \sqrt{a \sec{\left (e + f x \right )} + a} \sec ^{4}{\left (e + f x \right )}\, dx + \int \sqrt{a \sec{\left (e + f x \right )} + a}\, dx\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c-c*sec(f*x+e))**4*(a+a*sec(f*x+e))**(1/2),x)

[Out]

c**4*(Integral(-4*sqrt(a*sec(e + f*x) + a)*sec(e + f*x), x) + Integral(6*sqrt(a*sec(e + f*x) + a)*sec(e + f*x)
**2, x) + Integral(-4*sqrt(a*sec(e + f*x) + a)*sec(e + f*x)**3, x) + Integral(sqrt(a*sec(e + f*x) + a)*sec(e +
 f*x)**4, x) + Integral(sqrt(a*sec(e + f*x) + a), x))

________________________________________________________________________________________

Giac [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c-c*sec(f*x+e))^4*(a+a*sec(f*x+e))^(1/2),x, algorithm="giac")

[Out]

Timed out